<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册用户</title>
</head>

<body>
    <form action="lagou" onsubmit="return login()">
        <p>帐号：<input id="username" type="text" placeholder="请输入帐号..." maxlength="5" onblur="test()"></p>
        <p>密码：<input id="password" type="password"></p>
        <p>性别：
            <input type="radio" name="sex" checked="checked"> 男
            <input type="radio" name="sex"> 女
        </p>
        <p>学历：
            <input type="radio" name="grade" checked="checked"> 本科
            <input type="radio" name="grade"> 专科
        </p>
        <p>自我介绍</p>
        <textarea id="introduce" cols="30" rows="10"></textarea>
        <p><button>提交</button></p>
    </form>
    <script>
        function test() {
            var name = document.getElementById("username").value;
            if (name != "admin") {
                alert("帐号输入出错，请重新输入！");
            }
        }

        function login() {
            var introduce = document.getElementById("introduce").value;
             alert(introduce);
            return false;
        }
    </script>
</body>

</html>